window.onload = function(){
	var num = 0;
    function method(num) {
        var a = document.getElementsByClassName('hdt_ul_li');
    	for (var i = 0; i < a.length; i++) {
        	a[i].style.display = 'none';
        }
        a[num].style.display = "";
    }
    function run(){
    	method(num);
    	if (num==4) {
    		num = 0;
    	}else{
    		num++;
    	}


    }
    var tim = setInterval(run,2000);
    var hdt_ul = document.getElementById("hdt_ul");
    hdt_ul.onmouseover = function(){
	clearInterval(tim);
    }
    hdt_ul.onmouseleave = function(){
    	tim = setInterval(run,2000);
    }
    var djk=document.getElementsByClassName('djk');
    for (var i=0;i<djk.length;i++) {
        main(i);
    };

    function main(i){
        djk[i].onclick=function(){
            num=i;
            run();
        }     
    }
    var bottn_l = document.getElementById('bottn_left');
    var bottn_r = document.getElementById('bottn_right');
    bottn_l.onclick=function(){
        // alert(num)
        if (num==1) {
            num=4;
        }else if(num==0){
            num=2;
        }
        else{
            num=num-2;
        };
        run();
    }
    bottn_r.onclick=function(){
        run();
    }
    var bian = document.getElementsByClassName('yyy');
    var yyyy = document.getElementById('yyyyyyy');
    function maxx(i){
            yyyy.style.display="none";
            bian[i].onmouseover = function(){
            yyyy.style.display = "";
          }
            bian[i].onmouseleave = function(){
            yyyy.style.display = "none";

          }
    }
    for (var i = 0; i < bian.length; i++) {
            maxx(i);
    }
    //------------------------------------------------------------------------------------------------------------
    //------------------------------------牛逼的楚汉分界线--------------------------------------------------------
    //------------------------------------------------------------------------------------------------------------
    var ss;
    var sss=0;
    var ssss=0;
    var oeg = document.getElementById("aaa");
    if(oeg.currentStyle){
            ss = parseInt(oeg.currentStyle["left"]);
        }else{
            ss = parseInt(getComputedStyle(oeg,false)["left"]);    
        } 
    function time(){
        ss=ss-9;
        oeg.style.left=ss+"px";
        if(ss <= -1226){
        clearInterval(pid);
        }
    }

    function times(){
        ss=ss+9;
        oeg.style.left=ss+"px";
        if(ss >= 0){
        clearInterval(pid);
        }
    }

    var ababc = document.getElementById("ababc");
    var babac = document.getElementById("babac");
    ababc.style.color="#DCDCDC";
    babac.style.color="#BCBCBC";
    ababc.style.cursor="default";
    babac.style.cursor="pointer";

    function kiss(){
       if (sss==1) {
            pid = window.setInterval(time,1);
            sss=0;
            ababc.style.color="#DCDCDC";
            babac.style.color="#BCBCBC";
            ababc.style.cursor="default";
            babac.style.cursor="pointer";
        } 
    }
    function kisss(){
        if(sss==0){
            pid = window.setInterval(times,1);
            sss=1;
            babac.style.color="#DCDCDC";
            babac.style.color="#DCDCDC";
            ababc.style.color="#BCBCBC";
            babac.style.cursor="default";
            ababc.style.cursor="pointer";
        }
    }
    ababc.onclick = function(){
        kiss();
    }
    babac.onclick = function(){
        kisss();
    }
    function lili(){
        if (ssss==0) {
            kiss();
            ssss=1;
        }else{
            kisss();
            ssss=0;
        };
    }
    window.setInterval(lili,2000);
    //****************************************************************************************************************************************
    //*                                                    华丽的分割线                                                                      *
    //****************************************************************************************************************************************
    var xmsj = document.getElementById("xmsj");
    var rig = 0;
    var rigs = 0;




    function tk_lk(){
        if(xmsj.currentStyle){
            var tk = parseInt(xmsj.currentStyle["height"]);
        }else{
            tk = parseInt(getComputedStyle(xmsj,false)["height"]);    
        } 
        tk=tk+4;
        if (tk>=200) {
            sbsb=0;
           clearInterval(rig);
        };
        // alert(tk);
        xmsj.style.height=tk+"px";
    }
    







    function tk_lks(){
        if(xmsj.currentStyle){
            var tk = parseInt(xmsj.currentStyle["height"]);
        }else{
            tk = parseInt(getComputedStyle(xmsj,false)["height"]);    
        } 
        tk = tk-4;
        if (tk<=0) {
            sbsb=0;
           clearInterval(rigs);
        };
        // alert(tk);
        xmsj.style.height=tk+"px";
    }
   
    var sbsb=0;

    var stst = document.getElementsByClassName("stst");
    function pvp(i){
        stst[i].onmouseover=function(){
            if(sbsb==0){
                sbsb=1;
                rig = window.setInterval(tk_lk,1);
            }
            
        }
        stst[i].onmouseout=function(){
            if (sbsb==0){
                sbsb=1;
                rigs = window.setInterval(tk_lks,1); 
            }
            
        }
    }
   for (var i = 0; i <stst.length; i++) {
      pvp(i);
   };
};
 